﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace LaCoJSC.AppCode.DAL
{
    public class Library
    {

        protected static string Connstr = ConfigurationManager.ConnectionStrings["SqlServices"].ToString();

        // Ham ket noi Data
        private static SqlConnection GetConnectionString()
        {
            SqlConnection myConn = new SqlConnection(Connstr);
            if (myConn.State == ConnectionState.Open)
                myConn.Close();


            myConn.Open();
            return myConn;
        }
        public SqlConnection ConectData()
        {
            return new SqlConnection(ConfigurationManager.ConnectionStrings["SqlServices"].ToString());
        }

    

    }

}